import junit.framework.TestCase;

/**
 * 
 */

/**
 * Class to make test of the Product class
 * @author JESUS
 *
 */
public class ProductTest extends TestCase {

	/**
	 * Test method for {@link Product#Product()}
	 * NO CONSIGO QUE FUNCIONE ESTE TEST
	 */
	public void testProduct(){
		Product p = new Product("pan", 0.50f,1);
		assertEquals("Checking constructor", p.toString(),("name=" + "pan" + ", price=" + 0.50f + ", quantity="+ 1));
	}

	/**
	 * Test method for {@link Product#TotalPrice()}
	 */
	public void testTotalPrice() {
		Product p = new Product("pan", 0.50f,1);
		assertEquals("Checking totals",p.TotalPrice(p),0.50f,0.1);
	}

}
